﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="jquery-1.6.4-dev.js" type="text/javascript"></script>
</head>
<body>
    <table style="width:100%; height:50%; position:absolute">
        <tr style="width:100%; height:100%;">
            <td style="width:20%;">
                <div id="div1" style=" background-color:Aqua;">
                1
                </div>
            </td>
            <td style="width:20%;">
                <div id="div2" style="background-color:Blue;">
                2
                </div>
            </td>
            <td style="width:20%;">
                <div id="div3" style="background-color:Fuchsia;">
                3
                </div>
            </td>
            <td style="width:20%;">
                <div id="div4" style="background-color:Gray;">
                4
                </div>
            </td>
            <td style="width:20%;position:relative">
                <div id="div5" style="background-color:Green;">
                5
                </div>
            </td>
        </tr>
        <tr>
        <td><a id="l" href="#">left</a></td>
        <td><a id="r" href="#">right</a> </td>
        </tr>
    </table>
   
       <script type="text/javascript">
           $("a[id='l']").click(
                function () 
                {
                    $('table').animate({ "left": "100px" }, 10000);
                    $('table').animate({ "left": "300px" }, 10000);
                    $('table').animate({ "left": "500px" }, 10000);
                }
                           );

                $("a[id='r']").click(
                function () {
                    $('table').clearQueue().hide();
                }
                           );     
            </script>     
</body>
</html>
